#ifndef DEF_BEZSURFACE
#define DEF_BEZSURFACE

#include <vector>

#include "../Object3D.h"
#include "../Maths/Math.h"
#include "../Primitives/Cube.h"


class BezierSurface : public Object3D
{

public:
	BezierSurface();
	BezierSurface(float* vertexControl, int nbControlPointsI, int nbControlPointsJ);
	~BezierSurface();

	void draw(Matrice &modelview, Matrice &projection);
	void drawVertex(Matrice &modelview, Matrice &projection);
	void drawControlPoints(Matrice &modelview, Matrice &projection);

protected:

	void computeVertex();
	float* BezierSurface::bezierSurfaceValue(float* points, int nbPoints, int nbPointsJ, float u, float v);

	float* _vertexControl;
	Cube** _cubeControl;
	int _nbControlPointsI;
	int _nbControlPointsJ;
	int _nbControlPoints;
	float* _colorControlPoints;
};

#endif